#! usr/bin/python3
from operator import add,sub
from random import randint,choice

ops={'+':add, '-':sub}
MAXRETIES =2

def doprob():
    op=choice('+-')
    numbers=[randint(0, 100) for i in range(2)]
    numbers.sort(reverse=True)
    ans=ops[op](*numbers)
    pr="%d %s %d = "%(numbers[0], op, numbers[1])
    oops =0
    while True:
        try:
            if int(input(pr)) == ans:
                print("corrent")
                break
            if oops == MAXRETIES:
                print("answer\n%s%d"%(pr,ans))
                break
            else:
                print("incorrent...try again...")
        except KeyboardInterrupt as e:
            print(e)

if __name__=="__main__":
    doprob()

